import {
  FormController,
  IFormDetailContainerController,
  IFormDetailProvider,
} from '@ibiz-template/runtime';
import { IDEFormDetail } from '@ibiz/model-core';
import { CheckinGroupTitleController } from './checkin-group-title.controller';

export class CheckinGroupTitleProvider implements IFormDetailProvider {
  component: string = 'IBizCheckinGroupTitle';

  async createController(
    detailModel: IDEFormDetail,
    form: FormController,
    parent: IFormDetailContainerController | undefined,
  ): Promise<CheckinGroupTitleController> {
    const c = new CheckinGroupTitleController(detailModel, form, parent);
    await c.init();
    return c;
  }
}
